WDV221 Intro Javascript

Javascript Date Object - In Class Exercise 8


Please complete the following exercises on this page. When complete post the page to your WDV221 folder on the server. Make a link in your WDV221 Intro Javascript page for this assignment. Contact your instructor and demonstrate that you have completed the assignment.

Using Blackboard complete the In Class Exercise Assignment. Download your Homework project and being working on it with your remaining time.

For each exercise use a comment line to put the Exercise number within the script. Also place a short description of what the script is doing.


Use a runtime script and document.write( ) to output the requested results.

Create and display a new Date object called today using an alert method. Today is:

Create and dispaly a new Date object called yesterday, with yesterday's date. Yesterday was:

Create and display a new Date object called tomorrow, with tomorrow's date. Tomorrow is:

Create and display a new Date object called oneWeek with the date one week from today. One week from today is:

Create and dispaly a new Date object called tenDays with the date 10 days from today. 10 Days from today is:

The current day is:

The current day of the week is:

The current month

The current year is:

Format today's date into mm/dd/yyyy and display:

Format today's date into dd/mm/yyyy and display: